06_PROJECTS PORTAL
Week 3 Algorithms · Dual Sovereign Core (AR / EN)
⚑ ALGORITHM IMPLEMENTATION & CONDORCET GRAPHS
AYMAN ELMASRY
Computational Creative Director · AI Prompt Engineer
Founder of Ayman Elmasry LLC
πŸ”’ ⚑ AEL Sovereign Seal (Active Master Verification)
{
  "ael_seal": "AEL CS Encyclopedia β€” Β© Ayman Elmasry",
  "owner": "Ayman Elmasry",
  "legal_entities": [
    "Ayman Elmasry LLC (UAE)",
    "Ayman Elmasry Advertising & Marketing (Egypt)"
  ],
  "syllabus_source": "Harvard CS50x 2026-2027",
  "domain": "Week 3: Algorithm Implementation & Graph Verification",
  "document_type": "06_Projects",
  "methodology": "8-Stage Sub-Silicon Execution Paradigm",
  "system_version": "v3.0"
}

Week 3 Projects Overview: Sorting Forensics & Tideman Graphs

Project 1: Opaque Binary Sorting Forensics (Sort)

This exercise trains the software engineer in empirical behavioral forensics. The student is provided three pre-compiled executables and tasked with deducing the exact internal sorting algorithm by monitoring runtime execution complexity.

===================================================================================
             SORT PROBLEM ASYMPTOTIC FORENSICS LOGIC
===================================================================================

  [ Run Time Experiment ] ──> Observe best/worst case speed ──> Categorize Algorithm
  (Random / Reversed / Sorted buffers)

===================================================================================

Project 2: Majoritarian & Instant-Runoff Voting (Plurality & Runoff)

Plurality deconstructs linear search and maximum tabulation. Runoff tracks multi-level voter preferences in a 2D matrix, actively eliminating candidates with the lowest tally and rolling their ballots over to subsequent preferences.

Project 3: The Absolute Apex Challenge – Tideman

Tideman overcomes the mathematical vulnerabilities of conventional voting systems by isolating the "Condorcet Winner"β€”the single candidate who would decisively win a head-to-head election against every other candidate in the field.

===================================================================================
             TIDEMAN GRAPH LOCKING PIPELINE (ACYCLIC DIRECTED GRAPH)
===================================================================================

  [ Pair Tabulation ] ──> [ Sort by Victory Margin ] ──> [ Lock Pairs (No Cycles!) ]

===================================================================================
  • The Apex Algorithmic Hurdle (lock_pairs): To prevent the formation of a closed circular graph (Cycle), developers must implement a Depth-First Search (DFS) recursive graph traversal algorithm to verify that no transitive path connects the prospective loser back to the winner before locking the directed edge.